package com.neusoft.neu24.his.hisapp.entity;

import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

public class Dept {
    private final Integer deptno;
    private final String dname;
    private final String loc;
    private final String tel;

    private IntegerProperty  deptnoProperty =new SimpleIntegerProperty();

    public IntegerProperty getDeptnoProperty() {
        return this.deptnoProperty ;
    }



    private StringProperty dnameProperty =new SimpleStringProperty();

    public StringProperty getDnameProperty() {
        return dnameProperty ;
    }

    private StringProperty locProperty =new SimpleStringProperty();

    public StringProperty getLocProperty() {
        return locProperty ;
    }

    private StringProperty telProperty =new SimpleStringProperty();

    public StringProperty getTelProperty() {
        return telProperty ;
    }


    public Dept(Integer deptno, String dname, String loc, String tel) {
        this.deptno = deptno;
        this.dname = dname;
        this.loc = loc;
        this.tel = tel;

        deptnoProperty.set(deptno);
        dnameProperty.set(dname);
        locProperty.set(loc);
        telProperty.set(tel);
    }

    public Integer getDeptno() {

        return   deptnoProperty.get();
    }

    public String getDname() {
        return dnameProperty.get();
    }
    public String getLoc() {
        return locProperty.get();
    }
    public String getTel() {
        return telProperty.get();
    }

    @Override
    public String toString() {
        return "Dept{" +
                "deptnoProperty=" + deptnoProperty.get() +
                ", dnameProperty=" + dnameProperty.get() +
                ", locProperty=" + locProperty.get() +
                ", telProperty=" + telProperty.get() +
                '}';
    }
}
